package com.gitee.wsl.android.ui.ext

import android.app.Application
import com.gitee.wsl.android.ext.LibScope
import com.gitee.wsl.android.ext.LibScopeImp


interface ApplicationScope: LibScope {
    fun initToastInterface(toastInterface: ToastInit.ToastInterface)

}

object ApplicationInit {
   fun init(app: Application,config:ApplicationScope.()->Unit) {
       config(ApplicationScopeImp(app))
   }
}

internal class ApplicationScopeImp(app: Application) : LibScopeImp(app),ApplicationScope{

    override fun initToastInterface(toastInterface: ToastInit.ToastInterface) {
        ToastInit.initToast(toastInterface)
    }


}


